package com.terrorism.sdk.utils;

import android.app.Activity;
import android.location.LocationManager;

/**
 * @since Monday, June 02, 2014
 * @author hoangcaomobile
 *
 */
public class LocationUtils {

	// check if Location Service enable
	public static boolean isEnableLocationService(Activity mActivity) {
		boolean isEnable = true;
		LocationManager locationManager = (LocationManager) mActivity.getSystemService(Activity.LOCATION_SERVICE);
		if(!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) && !locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
			// All location services are disabled
			isEnable = false;
		}
		return isEnable;
	}
	// --

}
